% TEST_ID: LANG-EXPAND-0084
% CATEGORY: stdlib/arithmetic_ops/triangle
% 测试 三角函数

function test_acsc_acscd_acsch()
acsc(0)
acsc(-0)
assert(round(acsc(3), 15) == 0.339836909454122)
assert(round(acsc(0.5), 15) == 1.570796326794897 - 1.316957896924817i)
% assert(round(acsc(-0.5), 15) ==  -1.570796326794897 + 1.316957896924817i)
assert(abs(real(acsc(-0.5)) + 1.570796326794897) < 1e-12 && abs(imag(acsc(-0.5)) - 1.316957896924817) < 1e-12)
assert(round(acsc(2+2i), 15) == 0.244522165135540 - 0.254895573340551i)

assert(round(acscd(3), 15) == 19.471220634490692)
% assert(round(acscd(0.5), 15) == 90.000000000000000 -75.456129290216893i)
assert(abs(real(acscd(0.5)) - 90.00) < 1e-12 && abs(imag(acscd(0.5)) + 75.456129290216893) < 1e-12)
% assert(round(acscd(-0.5), 15) ==  -90.000000000000000 +75.456129290216893i)
assert(abs(real(acscd(-0.5)) + 90.00) < 1e-12 && abs(imag(acscd(-0.5)) - 75.456129290216893) < 1e-12)
% assert(round(acscd(2+2i), 15) ==  14.010088059667416 -14.604440568980905i)
assert(abs(real(acscd(2+2i)) - 14.010088059667416) < 1e-12 && abs(imag(acscd(2+2i)) + 14.604440568980905) < 1e-12)

assert(round(acsch(3), 15) == 0.327450150237258)
assert(round(acsch(2 + 2i), 15) == 0.254895573340551 - 0.244522165135540i)